/*
 * 作者:熊猫
 * 日期:2017 - 3 - 15 4 - 33 - 9
 *
 */

package net.lainiao.morethread.Chapter6.demo7;

/**
 * Created by Administrator on 2017/3/15.
 */
public class Bank implements Runnable {
    private Account account;

    public Bank(Account account) {
        this.account = account;
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            account.subtractAmount(1000);
        }
    }
}
